<!--
 * @Author: xuzehan 123@qq.com
 * @Date: 2023-05-30 15:13:47
 * @LastEditors: xuzehan 123@qq.com
 * @LastEditTime: 2023-05-31 17:13:14
 * @FilePath: \ant-design-vue-jeecg-master\src\views\taskManagement\modules\taskAllocationInfo.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <a-modal
      title="指控车及导弹资源分配详情"
      :visible="visible"
      :confirm-loading="confirmLoading"
      @ok="handleOk"
      width="55%"
      @cancel="handleCancel"
    >
      <a-collapse v-model="activeKey">
        <a-collapse-panel key="1" header="星指上/下行链路工作参数配置" disabled>
          <a-form-model :model="form" :label-col="labelCol1" :wrapper-col="wrapperCol1">
            <a-row>
              <a-col :span="16">
                <a-form-model-item label="指控车同步时隙起跳数配置">
                  <a-input v-model="form.count"></a-input>
                  <!-- <a-radio-group
                    v-model="value1"
                    @change="onChange1"
                    style="display: block; margin-bottom: 10px"
                    button-style="solid"
                  >
                    <a-radio-button value="a"> 车1 </a-radio-button>
                    <a-radio-button value="b"> 车2 </a-radio-button>
                    <a-radio-button value="c"> 车3 </a-radio-button>
                    <a-radio-button value="d"> 车4 </a-radio-button>
                  </a-radio-group>
                  <br />
                  <a-radio-group v-model="value2" @change="onChange1" button-style="solid">
                    <a-radio-button value="1"> 1 </a-radio-button>
                    <a-radio-button value="2"> 2 </a-radio-button>
                    <a-radio-button value="3"> 3 </a-radio-button>
                    <a-radio-button value="4"> 4 </a-radio-button>
                  </a-radio-group> -->
                </a-form-model-item>
              </a-col>
              <!-- <a-col :span="4">
                <a-form-model-item>
                  <a-button @click="creatInstruct" type="primary"> 发送</a-button>
                </a-form-model-item>
              </a-col> -->
            </a-row>
            <a-row>
              <a-col :span="16">
                <a-form-model-item label="星指上行链路工作参数配置">
                  <a-select v-model="form.region1" placeholder="请选择" mode="tags" @change="handleChange">
                    <a-select-option value="shanghai"> Zone one </a-select-option>
                    <a-select-option value="beijing"> Zone two </a-select-option>
                  </a-select>
                </a-form-model-item>
              </a-col>
              <!-- <a-col :span="4">
                <a-form-model-item>
                  <a-button @click="creatInstruct" type="primary"> 发送</a-button>
                </a-form-model-item>
              </a-col> -->
            </a-row>
            <a-row>
              <a-col :span="16">
                <a-form-model-item label="星指下行链路工作参数配置">
                  <a-select v-model="form.region" placeholder="请选择" mode="tags" @change="handleChange">
                    <a-select-option value="shanghai"> Zone one </a-select-option>
                    <a-select-option value="beijing"> Zone two </a-select-option>
                  </a-select>
                </a-form-model-item>
              </a-col>
              <!-- <a-col :span="4">
                <a-form-model-item>
                  <a-button @click="creatInstruct" type="primary"> 发送</a-button>
                </a-form-model-item>
              </a-col> -->
            </a-row>
            <a-row>
              <a-col :span="16">
                <a-form-model-item label="指控车时隙资源">
                  <a-input v-model="value" />
                </a-form-model-item>
              </a-col>
              <!-- <a-col :span="4">
                <a-form-model-item>
                  <a-button @click="creatInstruct" type="primary"> 发送</a-button>
                </a-form-model-item>
              </a-col> -->
            </a-row>
            <!-- <a-divider />
            <a-row>
              <a-col :span="16">
                <a-form-model-item label="指控车资源配置">
                  <a-tabs default-active-key="1" :activeKey="tabActiveKey" @change="callback" class="tabs">
                    <a-tab-pane key="1" tab="车1">
                      <a-checkbox-group @change="onChange" defaultChecked="">
                        <a-row>
                          <a-col :span="3" v-for="(item, index) in resourcesList" :key="index + 'car1'">
                            <a-checkbox :value="index" :disabled="item.disabled && item.active != 1"> </a-checkbox>
                          </a-col>
                        </a-row>
                      </a-checkbox-group>
                    </a-tab-pane>
                    <a-tab-pane key="2" tab="车2">
                      <a-checkbox-group @change="onChange" defaultChecked="">
                        <a-row>
                          <a-col :span="3" v-for="(item, index) in resourcesList" :key="index + 'car2'">
                            <a-checkbox :value="index" :disabled="item.disabled && item.active != 2"> </a-checkbox>
                          </a-col>
                        </a-row>
                      </a-checkbox-group>
                    </a-tab-pane>
                    <a-tab-pane key="3" tab="车3">
                      <a-checkbox-group @change="onChange" defaultChecked="">
                        <a-row>
                          <a-col :span="3" v-for="(item, index) in resourcesList" :key="index + 'car3'">
                            <a-checkbox :value="index" :disabled="item.disabled && item.active != 3"> </a-checkbox>
                          </a-col>
                        </a-row> </a-checkbox-group
                    ></a-tab-pane>
                    <a-tab-pane key="4" tab="车4">
                      <a-checkbox-group @change="onChange" defaultChecked="">
                        <a-row>
                          <a-col :span="3" v-for="(item, index) in resourcesList" :key="index + 'car4'">
                            <a-checkbox :value="index" :disabled="item.disabled && item.active != 4"> </a-checkbox>
                          </a-col>
                        </a-row> </a-checkbox-group
                    ></a-tab-pane>
                  </a-tabs>
                </a-form-model-item>
              </a-col>
              <a-col :span="4">
                <a-form-model-item>
                  <a-button @click="creatInstruct" type="primary"> 发送</a-button>
                </a-form-model-item>
              </a-col>
            </a-row> -->
          </a-form-model>
        </a-collapse-panel>
        <a-collapse-panel key="2" header="星弹工作参数配置" disabled>
          <a-form-model :model="form1" :label-col="labelCol" :wrapper-col="wrapperCol">
            <a-row>
              <a-col :span="16">
                <a-form-model-item label="星弹上行链路工作参数配置">
                  <a-select v-model="form1.region" placeholder="请选择" allowClear>
                    <a-select-option value="1"> 指控车1 </a-select-option>
                    <a-select-option value="2"> 指控车2 </a-select-option>
                    <a-select-option value="3"> 指控车3 </a-select-option>
                    <a-select-option value="4"> 指控车4 </a-select-option>
                  </a-select>
                  <pool ref="pool" :total="1920" :small="0" v-if="form1.region" />
                </a-form-model-item>
              </a-col>
              <!-- <a-col :span="4">
                <a-form-model-item>
                  <a-button @click="creatInstruct" type="primary"> 发送</a-button>
                </a-form-model-item>
              </a-col> -->
            </a-row>
            <a-row>
              <a-col :span="16">
                <a-form-model-item label="星弹下行链路工作参数配置">
                  <a-select v-model="form1.speed" placeholder="请选择">
                    <a-select-option value="32kbps"> 32kbps </a-select-option>
                    <a-select-option value="96kbps"> 96kbps </a-select-option>
                    <a-select-option value="256kbps"> 256kbps </a-select-option>
                    <a-select-option value="1024kbps"> 1024kbps </a-select-option>
                  </a-select>
                </a-form-model-item>
              </a-col>
              <!-- <a-col :span="4">
                <a-form-model-item>
                  <a-button @click="creatInstruct" type="primary"> 发送</a-button>
                </a-form-model-item>
              </a-col> -->
            </a-row>
          </a-form-model>
        </a-collapse-panel>
      </a-collapse>
    </a-modal>
  </div>
</template>

<script>
export default {
  data() {
    return {
      visible: false,
      confirmLoading: false,
      form: {},
      form1: {},
      value: '',
      labelCol: { span: 8 },
      wrapperCol: { span: 16 },
      labelCol1: { span: 8 },
      wrapperCol1: { span: 16 },
      activeKey: ['1', '2'],
    }
  },
  methods: {
    handleChange() {},
    showModal() {
      this.visible = true
    },
    handleOk(e) {
      this.confirmLoading = true
      //调新增接口
      setTimeout(() => {
        this.visible = false
        this.confirmLoading = false
      }, 2000)
    },
    handleCancel(e) {
      console.log('Clicked cancel button')
      this.visible = false
    },
  },
}
</script>

<style></style>
